package com.example.bausip;

import java.util.ArrayList;
import java.util.HashMap;

import android.util.Log;

public class MyStoredEvents {
	
	HashMap<Integer, Integer> myEvents = new HashMap<Integer, Integer>();
	HashMap<Integer, Integer> events_2014_single = new HashMap<Integer, Integer>();
	HashMap<Integer, Integer> events_2014_double = new HashMap<Integer, Integer>();		
	HashMap<Integer, Integer> events_2015_single = new HashMap<Integer, Integer>();
	HashMap<Integer, Integer> events_2015_double = new HashMap<Integer, Integer>();
	
	public void MyStoredEvents()
	{		
		events_2014_single.put(6, 10);
		events_2014_single.put(8, 10);
		events_2014_double.put(9, 10);
		events_2014_single.put(11, 10);
		events_2014_single.put(27, 10);
		
		events_2014_single.put(8, 11);
		events_2014_single.put(27, 11);

		events_2014_single.put(1, 12);
		events_2014_single.put(8, 12);
		events_2014_single.put(24, 12);
		
		events_2015_single.put(4, 1);
		events_2015_single.put(6, 1);
		events_2015_single.put(9, 1);
		events_2015_single.put(15, 1);
		events_2015_single.put(19, 1);
		events_2015_single.put(28, 1);
		events_2015_single.put(29, 1);
		events_2015_double.put(24, 1);

		events_2015_single.put(6, 2);
		events_2015_single.put(8, 2);
		events_2015_single.put(9, 2);
		events_2015_single.put(21, 2);
		events_2015_single.put(25, 2);
		events_2015_double.put(22, 2);
		
		events_2015_single.put(1, 3);
		events_2015_single.put(24, 3);

		events_2015_single.put(5, 4);
		events_2015_single.put(12, 4);
		events_2015_single.put(15, 4);
		events_2015_single.put(22, 4);

		events_2015_single.put(5, 5);
		events_2015_single.put(18, 5);
		events_2015_single.put(19, 5);
		events_2015_single.put(26, 5);

		events_2015_single.put(2, 6);
		events_2015_single.put(3, 6);
		events_2015_single.put(8, 6);
		events_2015_single.put(20, 6);
		events_2015_single.put(28, 6);
		
		events_2015_double.put(8, 7);
		events_2015_single.put(9, 7);
		events_2015_single.put(12, 7);
		events_2015_single.put(19, 7);
		events_2015_single.put(21, 7);
		events_2015_single.put(26, 7);

		events_2015_double.put(10, 8);
		events_2015_single.put(15, 8);
		events_2015_single.put(19, 8);
		events_2015_single.put(20, 8);
		events_2015_single.put(22, 8);

		events_2015_double.put(10, 9);
		events_2015_single.put(15, 9);
		events_2015_single.put(19, 9);
		events_2015_single.put(26, 9);
		events_2015_single.put(29, 9);		
		//events_2015_single.get(10)
		
	}

	public static int getNbEvents(int position,int month,int year)
	{
		Integer numEvents =0 ;
		if( position == 6 && month ==10 && year == 2014)
		{				
			numEvents = 1;
		}
		else if (  position == 8 && month ==10 && year == 2014)
		{
			numEvents = 1;
		}
		else if (  position == 9 && month ==10 && year == 2014)
		{
			numEvents = 2;;
		}
		else if (  position == 11 && month ==10 && year == 2014)
		{
			 numEvents = 1;
		}
		else if ( position == 27 && month ==10 && year == 2014)
		{
			numEvents = 1;
		}
		else if ( position == 8 && month ==11 && year == 2014)
		{
			numEvents = 1;
		}
		else if ( position == 27 && month ==11 && year == 2014)
		{
			numEvents = 1;
		}		
		
		
		else if ( position == 1 && month ==12 && year == 2014)
		{
			numEvents = 1;
		}		
		else if ( position == 8 && month ==12 && year == 2014)
		{
			numEvents = 1;
		}
		else if ( position == 24 && month ==12 && year == 2014)
		{
			numEvents = 1;
		}
		
		
		else if ( position == 4 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 6 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 9 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 15 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 19 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 24 && month ==1 && year == 2015)
		{
			numEvents = 2;
		}
		else if ( position == 28 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 29 && month ==1 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 6 && month ==2 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 8 && month ==2 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 9 && month ==2 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 21 && month ==2 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 22 && month ==2 && year == 2015)
		{
			numEvents = 2;
		}
		else if ( position == 25 && month ==2 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 1 && month ==3 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 24 && month ==3 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 5 && month ==4 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 8 && month ==4 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 12 && month ==4 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 15 && month ==4 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 22 && month ==4 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 5 && month ==5 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 18 && month ==5 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 19 && month ==5 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 26 && month ==5 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 2 && month ==6 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 3 && month ==6 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 8 && month ==6 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 20 && month ==6 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 28 && month ==6 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 8 && month ==7 && year == 2015)
		{
			numEvents = 2;
		}
		else if ( 
				(position == 9 || position == 12 || position == 19 || position == 21 || position == 26 ) 
				&& month ==7 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 10 && month ==8 && year == 2015)
		{
			numEvents = 2;
		}
		else if ( 
				(position == 15 || position == 19 || position == 20 || position == 22) 
				&& month ==8 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( 
				(position == 15 || position == 19 || position == 26 || position == 29) 
				&& month ==9 && year == 2015)
		{
			numEvents = 1;
		}
		else if ( position == 10 && month ==9 && year == 2015)
		{
			numEvents = 2;
		}
		return numEvents;
	}
	
	public static ArrayList<String> getEvents(String date)
	{
		ArrayList<String> events = new ArrayList<String>();
		String  event = "";
		Log.d("ray","rayyyy: "+date);
		if(date.equals("4-October-2014"))
		{				
			event = "Eid Al-Adha Holiday Begins";
			events.add(event);	
		}
		else if(date.equals("6-October-2014"))
		{
            event = "Eid Al-Adha Holiday Ends";
            events.add(event);
		}
		else if (date.equals("7-October-2014"))
        {
            event = "Fall Begins";
            events.add(event);

            event = "Fall Add/Drop Period Begins";
            events.add(event);
        }
        else if(date.equals("9-October-2014"))
        {
            event = "Fall Add/Drop Period Begins";
            events.add(event);
        }
        else if(date.equals("25-October-2014"))
        {
            event = "Hijra New Year";
            events.add(event);
        }
        else if(date.equals("3-November-2014"))
        {
            event = "Ashoura Holiday";
            events.add(event);
        }
        else if(date.equals("22-November-2014"))
        {
            event = "Independence Day";
            events.add(event);
        }
        else if(date.equals("1-December-2014"))
        {
            event = "Fall Withdraw Period Begins";
            events.add(event);
        }
        else if(date.equals("8-December-2014"))
        {
            event = "Fall Change of Major Period Begins";
            events.add(event);
        }
        else if(date.equals("24-December-2014"))
        {
            event = "Christmas & New Year Vacation Begins";
            events.add(event);
        }
        else if(date.equals("1-January-2015"))
        {
            event = "Christmas & New Year Vacation Ends";
            events.add(event);
        }
        else if(date.equals("3-January-2015"))
        {
            event = "Prophet's Holiday";
            events.add(event);
        }
        else if(date.equals("6-January-2015"))
        {
            event = "Armenian Christmas";
            events.add(event);
        }
        else if(date.equals("12-January-2015"))
        {
            event = "Fall Change of Major Period End";
            events.add(event);
        }
        else if(date.equals("16-January-2015"))
        {
            event = "Spring Registration Period Begins at 10 AM";
            events.add(event);
        }
        else if(date.equals("21-January-2015"))
        {
            event = "Fall Ends Fall Withdraw Period Ends at Midnight";
            events.add(event);
        }
        else if(date.equals("25-January-2015"))
        {
            event = "Spring Registration Period Ends at Midnight";
            events.add(event);
        }
        else if(date.equals("26-January-2015"))
        {
            event = "Final Exams for Fall Begin";
            events.add(event);
        }
        else if(date.equals("7-February-2015"))
        {
            event = "Final Exams for Fall End";
            events.add(event);
        }
        else if(date.equals("9-February-2015"))
        {
            event = "St. Maroun's Holiday";
            events.add(event);
        }
        else if(date.equals("10-February-2015"))
        {
            event = "Spring Registration Begins at 10 AM";
            events.add(event);
        }
        else if(date.equals("22-February-2015"))
        {
            event = "Spring Registration Ends at Midnight";
            events.add(event);
        }
        else if(date.equals("23-February-2015"))
        {
            event = "Spring Strats";
            events.add(event);

            event = "Spring Add/Drop Period Begins";
            events.add(event);
        }
        else if(date.equals("26-February-2015"))
        {
            event = "Spring Add/Drop Period Ends";
            events.add(event);
        }
        else if(date.equals("2-March-2015"))
        {
            event = "Summer Change of Major Period Begins";
            events.add(event);
        }
        else if(date.equals("25-March-2015"))
        {
            event = "Annuciation Holiday";
            events.add(event);
        }
        else if(date.equals("3-April-2015"))
        {
            event = "Easter Holiday";
            events.add(event);
        }
        else if(date.equals("6-April-2015"))
        {
            event = "Easter Holiday";
            events.add(event);
        }
        else if(date.equals("10-April-2015"))
        {
            event = "Easter Holiday";
            events.add(event);
        }
        else if(date.equals("13-April-2015"))
        {
            event = "Easter Holiday";
            events.add(event);
        }
        else if(date.equals("20-April-2015"))
        {
            event = "Spring Withdraw Period Begins";
            events.add(event);
        }
        else if(date.equals("1-May-2015"))
        {
            event = "Labor Day";
            events.add(event);
        }
        else if(date.equals("14-May-2015"))
        {
            event = "Summer Change of Major Period Ends";
            events.add(event);
        }
        else if(date.equals("15-May-2015"))
        {
            event = "Summer Registration Begins at 10 AM";
            events.add(event);
        }
        else if(date.equals("22-May-2015"))
        {
            event = "Fall Registration Begins at 10 AM";
            events.add(event);
        }
        else if(date.equals("2-June-2015"))
        {
            event = "Spring Withdraw Period Ends at Midnight";
            events.add(event);
        }
        else if(date.equals("3-June-2015"))
        {
            event = "Spring Semester Ends";
            events.add(event);
        }
        else if(date.equals("8-June-2015"))
        {
            event = "Final Exams for Spring Begin";
            events.add(event);
        }
        else if(date.equals("20-June-2015"))
        {
            event = "Final Exams for Spring End";
            events.add(event);
        }
        else if(date.equals("28-June-2015"))
        {
            event = "Summer/Fall Registration Period Ends at Midnight";
            events.add(event);
        }
        else if(date.equals("6-July-2015"))
        {
            event = "Regular & Extended Summer Begin";
            events.add(event);

            event = "Summer Add/Drop Period Begins";
            events.add(event);
        }
        else if(date.equals("7-July-2015"))
        {
            event = "Summer Add/Drop Period Ends";
            events.add(event);
        }
        else if(date.equals("10-July-2015"))
        {
            event = "Fall Change of Major Period Begins";
            events.add(event);
        }
        else if(date.equals("17-July-2015"))
        {
            event = "Eid Al-Fitr Holiday Begins";
            events.add(event);
        }
        else if(date.equals("19-July-2015"))
        {
            event = "Eid Al-Fitr Holiday Ends";
            events.add(event);
        }
        else if(date.equals("24-July-2015"))
        {
            event = "Summer Withdraw Period Begins";
            events.add(event);
        }
        else if(date.equals("5-August-2015"))
        {
            event = "Summer Ends";
            events.add(event);

            event = "Summer Withdraw Period Ends";
            events.add(event);
        }
        else if(date.equals("10-August-2015"))
        {
            event = "Final Exams for Summer Begin";
            events.add(event);
        }
        else if(date.equals("14-August-2015"))
        {
            event = "Final Exams for Summer End";
            events.add(event);
        }
        else if(date.equals("15-August-2015"))
        {
            event = "Assumption Day";
            events.add(event);
        }
        else if(date.equals("17-August-2015"))
        {
            event = "Extended Summer Withdraw Period Begins";
            events.add(event);
        }
        else if(date.equals("9-September-2015"))
        {
            event = "Extended Summer Ends";
            events.add(event);

            event = "Extended Summer Withdraw Period Ends";
            events.add(event);
        }
        else if(date.equals("14-September-2015"))
        {
            event = "Final Exams fo Extended Summer Begin";
            events.add(event);
        }
        else if(date.equals("18-September-2015"))
        {
            event = "Final Exams for Extended Summer End";
            events.add(event);
        }
        else if(date.equals("25-September-2015"))
        {
            event = "Fall Registration Period Begins at 10 AM";
            events.add(event);
        }
        else if(date.equals("28-September-2015"))
        {
            event = "Fall Change of Major Period Ends";
            events.add(event);
        }
		Log.d("ray","IN HERE: "+events.size());
		return events;
	}

}
